Builder

Builder class for Action objects.

Constructors

Link copied to clipboard
constructor(@Nullable icon: @Nullable IconCompat, @Nullable title: @Nullable CharSequence, @Nullable intent: @Nullable PendingIntent)
Construct a new builder for Action object.
constructor(icon: Int, @Nullable title: @Nullable CharSequence, @Nullable intent: @Nullable PendingIntent)
Construct a new builder for Action object.
constructor(@NonNull action: @NonNull NotificationCompat.Action)
Construct a new builder for Action object using the fields from an Action.

Functions

Link copied to clipboard
@NonNull
open fun addExtras(@Nullable extras: @Nullable Bundle): @NonNull NotificationCompat.Action.Builder
Merge additional metadata into this builder.
Link copied to clipboard
@NonNull
open fun addRemoteInput(@Nullable remoteInput: @Nullable RemoteInput): @NonNull NotificationCompat.Action.Builder
Add an input to be collected from the user when this action is sent.
Link copied to clipboard
@NonNull
open fun build(): @NonNull NotificationCompat.Action
Combine all of the options that have been set and return a new Action object.
Link copied to clipboard
@NonNull
open fun extend(@NonNull extender: @NonNull NotificationCompat.Action.Extender): @NonNull NotificationCompat.Action.Builder
Apply an extender to this action builder.
Link copied to clipboard
Link copied to clipboard
@NonNull
open fun getExtras(): @NonNull Bundle
Get the metadata Bundle used by this Builder.
Link copied to clipboard
@NonNull
open fun setAllowGeneratedReplies(allowGeneratedReplies: Boolean): @NonNull NotificationCompat.Action.Builder
Set whether the platform should automatically generate possible replies to add to getChoices.
Link copied to clipboard
@NonNull
open fun setAuthenticationRequired(authenticationRequired: Boolean): @NonNull NotificationCompat.Action.Builder
From API 31, sets whether the OS should only send this action's PendingIntent on an unlocked device.
Link copied to clipboard
@NonNull
open fun setContextual(isContextual: Boolean): @NonNull NotificationCompat.Action.Builder
Sets whether this Action is a contextual action, i.e.
Link copied to clipboard
@NonNull
open fun setSemanticAction(semanticAction: Int): @NonNull NotificationCompat.Action.Builder
Sets the SemanticAction for this Action.
Link copied to clipboard
@NonNull
open fun setShowsUserInterface(showsUserInterface: Boolean): @NonNull NotificationCompat.Action.Builder
Set whether or not this Action's PendingIntent will open a user interface.